Field of the Invention
The present invention relates to techniques for encoding Bayer array RAW image data.
Description of the Related Art
CCD sensors or CMOS sensors are recently being employed as image sensors in image capturing apparatuses such as digital cameras. Such sensors use a color filter array (called a “CFA” hereinafter) on the surface of the sensor to produce a single color component with a single pixel. Using a CFA makes it possible to obtain Bayer array image data (called “RAW image data” hereinafter), in which R (red), G0 (green), B (blue), and G1 (green) pixels are arranged in a 2×2 cyclical pattern, as illustrated in FIG. 2. Human vision has a property of being particularly sensitive to luminance components. In light of this, in a typical Bayer array, the number of pixels having a green component, which contains a high level of luminance components, is twice the number of pixels having a red component or a blue component, as illustrated in FIG. 2. In RAW image data, a single pixel only contains information of a single color component. As opposed to this, a single pixel in a normal color image to be viewed by a human is constituted of three components, namely red, blue, and green. Accordingly, RAW image data is transformed into RGB image data, in which a single pixel has the three components of red, blue, and green, by subjecting the RAW image data to a process known as demosaicing. Generally, RGB image data obtained from demosaicing or YUV image data obtained by transforming RGB image data is subjected to an encoding process in order to reduce the data amount. However, the demosaicing process results in a single pixel having three color components, which means that the demosaiced image data will have three times more data than the RAW image data. For this reason, methods for directly encoding and recording RAW image data prior to demosaicing are being proposed.
Japanese Patent Laid-Open No. 2003-125209 (“Document 1” hereinafter) discloses a method in which image data is separated into four planes, namely image data constituted of a Bayer array R component, image data constituted of a G0 component, image data constituted of a B component, and image data constituted of a G1 component, and each plane is then encoded.
Meanwhile, Japanese Patent Laid-Open No. 2006-121669 (“Document 2” hereinafter) discloses a method in which RAW image data is separated into four planes, namely R, G0, B, and G1, in the same manner as in Document 1, which are then transformed approximately into a luminance Y and color differences Co, Cg, Dg and encoded.
In the method according to Document 1, the G0 component and the G1 component, which are spatially close and have high correlation due to being the same color, are encoded as separate planes. Thus the encoding in this method is less efficient than in cases where both the G0 and G1 components are encoded as a single plane.
On the other hand, the method according to Document 2 allocates a higher amount of code to the luminance (Y) plane on the basis of the properties of human vision, which makes it possible to prevent a drop in resolution while also encoding more efficiently than the method according to Document 1. However, in the case where data has been encoded using the method according to Document 2, if, for example, a user carries out development and color grading through a decoding process, it is possible that unanticipated color noise will arise depending on how that process is configured.